﻿// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

using System.Linq;
using Windows.UI.Xaml.Navigation;
using Microsoft.Practices.Prism.Mvvm.Interfaces;
using Microsoft.Practices.Unity;
using Telerik.UI.Xaml.Controls.Grid;

namespace CityDashboard.Views
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class TopNhaDauTuPage
    {
        public TopNhaDauTuPage()
        {
            this.InitializeComponent();
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            this.DataContext = e.Parameter;
            base.OnNavigatedTo(e);
        }

        private void RadDataGrid_OnSelectionChanged(object sender, DataGridSelectionChangedEventArgs e)
        {
            var nav = (INavigationService)(App.Current as App).Container.Resolve(typeof(INavigationService));
            nav.Navigate("NhaDauTu", e.AddedItems.First());
        }
    }

}
